import React from "react";
import { Route, Switch } from "react-router-dom";
import Nav from "./nav";

const RouteDome3: React.FC = () => (
	<Nav>
		<Switch>
			<Route exact={true} path="/" component={Main}></Route>
			<Route path="/about" component={About}></Route>
			<Route path="/topic" component={Topic}></Route>
		</Switch>
	</Nav>
);

const Main: React.FC = () => <div>this is Main page</div>;

const About: React.FC = () => <div>this is About page</div>;

const Topic: React.FC = () => <div>this is Topic page</div>;

export default RouteDome3;
